package com.juneng.common;


import com.baomidou.mybatisplus.extension.api.IErrorCode;

/**
 * @author JohnSoybean
 * @create 2020/11/10 12:09
 * @description 枚举一些常用API错误码
 */
public enum ResultCode implements IErrorCode {

    SUCCESS(200, "success"),
   // FAILED(300, "Token"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(403, "暂未登录或token已经过期"),
    FORBIDDEN(300, "没有相关权限");

    private long code;
    private String message;

    private ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return code;
    }

    public String getMsg() {
        return null;
    }

    public String getMessage() {
        return message;
    }
}
